// image load module, added by regret
#ifndef _IMAGELOADP_H_
#define _IMAGELOADP_H_

// image load use GDI+
void GDIPInit();
void GDIPShutdown();

HBITMAP loadImageFromFile(wchar_t* filename, HWND hWnd = NULL, bool keepAspect = false);
HBITMAP loadImageFromBuffer(const void* buf, unsigned int size, HWND hWnd = NULL, bool keepAspect = false);

HBITMAP loadAnImage(wchar_t* filename);
HBITMAP loadPNGFromFile(wchar_t* filename, HWND hWnd, bool keepAspect = false);
HBITMAP loadPNGFromBuffer(const void* buf, unsigned int size, HWND hWnd, bool keepAspect = false);

void imageGetLastSize(unsigned& w, unsigned& h);

#endif // _IMAGELOADP_H_
